<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="../css/common.css" />
		<link rel="stylesheet" type="text/css" href="../font/iconfont.css" />
		<script src="../js/vue.mini.js" type="text/javascript" charset="utf-8"></script>
		<style type="text/css">
			.jtabs {
				position: fixed;
				height: 4.5rem;
				background: #f5f5f5;
				top: 0;
				left: 0;
				width: 100%;
				z-index: 100;
				display: flex;
				display: -webkit-flex;
				font-size: 1.6rem;
			}
			
			.jtabheight {
				height: 4.5rem;
			}
			
			.jtab-item {
				display: block;
				flex: 1;
				-webkit-flex: 1;
				text-align: center;
				line-height: 4.5rem;
			}
			
			.jtab-active {
				color: dodgerblue;
				border-bottom: 2px solid dodgerblue;
			}
			
			#shopimg {
				position: relative;
				font-size: 0;
			}
			
			#shopingo {
				position: absolute;
				left: 0;
				top: 0;
				width: 100%;
				height: 100%;
				overflow: hidden;
				text-align: center;
			}
			
			#shoptitle {
				background: rgba(0, 0, 0, 0.3);
				border-radius: 10rem;
				padding:10px 25px 10px 25px;
				color: #f5f5f5;
				font-size:18px;
			}
			
			#gaunzhus {
				color: #fff;
				font-size:14px;
			}
			
			.guanzhustitle {
				color: #FFAF00;
			}
			
			.colorred {
				color: #FFAF00;
			}
			
			#guanzhuline {
				padding: 0 1rem 0 1rem;
			}
			
			#shopbtn {
				width: auto;
				height:4rem;
				background: #fff;
				position: relative;
				display: flex;
				display: -webkit-flex;
				font-size:16px;
			}
			
			.shopbtnitem {
				display: block;
				flex: 1;
				-webkit-flex: 1;
				text-align: center;
				height: auto;
				position: relative;
			}
			
			#shopbtnitem1,
			#shopbtnitem2 {
				border-right: 1px solid #eee;
			}
			
			.icontb {
				color: #FFAF00;
				padding-right: 0.5rem;
				font-weight: bold;
			}
			
			.sheight {
				height: 1rem;
			}
			
			.renzhengtitle,.renzhengtitle2 {
				height: 3rem;
				padding: 0 0 0 1.5rem;
				line-height: 3rem;
				font-weight: bold;
			}
			
			.ulform-li {
				display: flex;
				display: -webkit-flex;
				background: #fff;
				padding: 1.5rem;
				position: relative;
			}
			
			.ulform-rli {
				flex: 1;
				-webkit-flex: 1;
				text-align: right;
			}
			
			.ulform-label {
				color: #999;
			}
			
			.ulform-rli-input {
				display: block;
				height: 100%;
				border: 0;
				padding-right: 5px;
			}
			
			.iconsn {
				padding-right: 0.5rem;
			}
			#jcontent{
				padding-bottom: 1rem;
			}
		</style>
	</head>

	<body>
		<div id="jcontent" class="jcontent">
			<div id="shopimg">
				<img id="logimg" src="../img/zw4.png" class="img"/>
				<div id="shopingo"  class="vcenter jflex">
					<div class="">
						<span id="shoptitle">{{shop.sellerName}}</span>
						<p id="gaunzhus">
							关注:&nbsp;&nbsp;<span class="guanzhustitle">{{shop.followNum}}</span>
							<span id="guanzhuline">|</span> 粉丝:&nbsp;&nbsp;
							<span class="guanzhustitle">{{shop.fansNum}}</span>
						</p>
					</div>
				</div>
			</div>
			<div id="shopbtn" class="line-b vcenter">
				<a class="shopbtnitem line-r"><i class="iconfont icontb icon-pinglun"></i>发送私信</a>
				<a class="shopbtnitem"><i class="iconfont icon-i1 icontb"></i>商家动态</a>
			</div>

			<div class="renzhengtitle">
				车主信息
			</div>
			<div id="data-list"></div>			
			<ul class="ulform">
				<li class="ulform-li line-b">
					<span class="ulform-label">车主姓名</span>
					<div class="ulform-rli">{{shop.reallyName}}</div>
				</li>
				<li class="ulform-li line-b">
					<span class="ulform-label">联系方式</span>
					<div class="ulform-rli">{{shop.tel}}</div>
				</li>
			</ul>

			<div class="renzhengtitle2">
				车辆信息
			</div>
			<ul class="ulform">
				<li class="ulform-li line-b">
					<span class="ulform-label">车辆品牌</span>
					<div class="ulform-rli">{{shop.carBrandName}}</div>
				</li>
				<li class="ulform-li line-b">
					<span class="ulform-label">车牌号码</span>
					<div class="ulform-rli">{{shop.licensePlate}}</div>
				</li>
				<li class="ulform-li line-b">
					<span class="ulform-label">购买日期</span>
					<div class="ulform-rli">{{shop.goumairiqi}}</div>
				</li>
			</ul>

			<a class="blockbtn" id="certification">提交认证</a>

		</div>
		<script src="../js/mui.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../js/common.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			var data = {shop: {}};
			var vm = new Vue({
				el: '#jcontent',
				data: data
			});
			
			//获取我的车辆信息
			mui.plusReady(function() {
				loadCars();
			});
			
			//加载信息
			function loadCars(){
//				alert(webapp.GetQueryString("logo"))
				//获取用户信息
				var _user = webapp.getUser();
				data.shop ={
					reallyName:_user.reallyName,
					tel:_user.tel,
					carBrandName:webapp.GetQueryString("pinpai"),
					licensePlate:webapp.GetQueryString("chepai"),
					goumairiqi:webapp.GetQueryString("goumairiqi"),
					sellerName:webapp.GetQueryString("sellerName"),
					fansNum:webapp.GetQueryString("fansNum"),
					followNum:webapp.GetQueryString("followNum"),
					logo:webapp.GetQueryString("logo")
				};
//				alert(logo)
				document.getElementById("logimg").src=webapp.GetQueryString("logo");//.setAttribute("src",logo);
			}
			
			//绑定认证点击事件
			mui('#jcontent').on('tap', '#certification', function(e) {
				renzhengSave();
			});
			
			//提交认证
			function renzhengSave(){
				webapp.ajax({
					url:"/carLife/admin/interface/authentication/add/save",
					data:{
						sellerId:webapp.GetQueryString("sellerId"),
						carMessageIds:webapp.GetQueryString("carMessageId")
					},
					success:function(json){
						if(json.code="200"){
							mui.toast("提交认证成功，请等待审核");
							mui.fire(plus.webview.getWebviewById("common-sub"),"loadList");
							window.setTimeout(function(){
								plus.webview.getTopWebview().hide("auto");
							},360);
						}else{
							mui.toast(json.msg);
						}
					}
				});
			}
		</script>
	</body>
</html>